<template>
  <div class="modeler">
    <iframe :src="src" frameborder="0" class="iframe"></iframe>
  </div>
</template>

<script>
    import { getToken } from '@/utils/auth'

    export default {
        data() {
            return {
                src: ""
            };
        },
        components: {},
        computed: {
            //...mapState("perModeler", {
            //    modelId: state => state.modelId
            //}),
            //...mapGetters([
            //    "token"
            //]),
            token() {
                return getToken();
            },
            apiUrl() {
                return process.env.VUE_APP_BASE_API;// 后台部署的api服务
            },
        },
        created() {
            const dataId = this.$route.params && this.$route.params.dataId;//获取传入的数据id
            this.src = "/modeler/modeler.html?modelId=" + dataId;
        },
        mounted() {
            window.getMyVue = this;
        },
        methods: {}
    };
</script>

<style lang="scss" scoped>
  .iframe {
    width: 100%;
    height: calc(100vh - 90px);
  }
</style>
